The Dreamweaver JavaScript API > Global document functions > dreamweaver.getElementRef() |
![]() ![]() ![]() |
Availability
Dreamweaver 2.0
Description
Gets the Netscape or IE object reference for a specific tag object in the DOM tree.
Arguments
NSorIE
, tagObject
![]() |
NSorIE must be either "NS 4.0" or "IE 4.0" . The DOM and rules for nested references differ in Navigator 4.0 and Internet Explorer 4.0. This argument specifies for which browser to return a valid reference. |
![]() |
tagObject is a tag object in the DOM tree. |
Returns
A string representing a valid JavaScript reference to the object, such as document.layers['myLayer']
.
![]() |
Dreamweaver returns correct references for Internet Explorer for A , AREA , APPLET , EMBED , DIV , SPAN , INPUT , SELECT , OPTION , TEXTAREA , OBJECT , and IMG tags. |
![]() |
Dreamweaver returns correct references for Navigator for A , AREA , APPLET , EMBED , LAYER , ILAYER , SELECT , OPTION , TEXTAREA , OBJECT , and IMG tags, and for absolutely positioned DIV and SPAN tags. For DIV and SPAN tags that are not absolutely positioned, Dreamweaver returns "cannot reference < tag >" . |
![]() |
Dreamweaver does not return references for unnamed objects. If an object does not contain either a NAME or an ID attribute, then Dreamweaver returns "unnamed < tag >" . If the browser does not support a reference by name, Dreamweaver references the object by index (for example, document.myform.applets[3] ). |
![]() |
Dreamweaver returns references for named objects contained in unnamed forms and layers (for example, document.forms[2].myCheckbox ). |
Enabler
None.
![]() ![]() ![]() |